﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <p id="msg"></p>
    <script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
    <script>
        $.ajax({
            url: 'http://apiadmintest.jjck.cn/FormalOrder/GetList?PageNumber=1&PageSize=1',
            type: 'get',
            headers: { 'Token': 'xxxxxx' },
            data: {},
            success: function (data) {
                $('#msg').text(JSON.stringify(data));
            }
        })




        $.ping = function (option) {
            var ping, requestTime, responseTime;
            var getUrl = function (url) {    //保证url带http://
                var strReg = "^((https|http)?://){1}"
                var re = new RegExp(strReg);
                return re.test(url) ? url : "http://" + url;
            }
            $.ajax({
                url: getUrl(option.url) + '/' + (new Date()).getTime() + '.html',  //设置一个空的ajax请求
                type: 'GET',
                dataType: 'html',
                timeout: 10000,
                beforeSend: function () {
                    if (option.beforePing) option.beforePing();
                    requestTime = new Date().getTime();
                },
                complete: function () {
                    responseTime = new Date().getTime();
                    ping = Math.abs(requestTime - responseTime);
                    if (option.afterPing) option.afterPing(ping);
                }
            });

            if (option.interval && option.interval > 0) {
                var interval = option.interval * 1000;
                setTimeout(function () { $.ping(option) }, interval);
                //        option.interval = 0;        // 阻止多重循环
                //        setInterval(function(){$.ping(option)}, interval);
            }
        };
        var txt1 = '';
        for (var i = 0; i < $('.vo-line').length; i++) {
            var id = $('.vo-line:eq(' + i + ')').attr('id');
            if ($('[title="'+id+'.mp3"]').text().length != 5) {
       
                var d = id.substring(0, 2);
                txt1 += 'https://k6i.github.io/' + d + '/' + id + '.mp3' + '\n\r';
            }
            
        }
        console.log(txt1.toString());


      
    </script>
</body>
</html>